home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 051-075 / disk_075 / dum2 / src / dumisc.def < prev    next >
Text File  |  1992-05-06  |  2KB  |  88 lines

  1. DEFINITION MODULE DuMisc;
  2.  
  3. (*
  4.         This module has several miscellaneous procedures
  5.         and was separated to keep the main program from getting
  6.         more cluttered than it was. Someday I'll clean it all up.
  7.  
  8.         Written: 3/21/87 by Greg Browne
  9.  
  10.         Compiles on TDI's Modula-2 Compiler version 2.20a
  11.  
  12.  
  13. *)
  14.  
  15. FROM SYSTEM             IMPORT  ADR, NULL;
  16. FROM Intuition          IMPORT  IntuiMessagePtr,IDCMPFlagSet,GadgetPtr,
  17.                                 IDCMPFlags;
  18. FROM DOSFiles           IMPORT  FileHandle;
  19. FROM DuWindow           IMPORT  GadgetNames;
  20.  
  21.  
  22. TYPE
  23.   CharPtr       = POINTER TO CHAR;
  24.  
  25. VAR
  26.   MyMsg         : IntuiMessagePtr;
  27.   MyClass       : IDCMPFlagSet;
  28.   OutHandle     : FileHandle;
  29.   MyGadPtr      : GadgetPtr;
  30.   GadGot        : GadgetNames;
  31.   MyX,MyY       : INTEGER;
  32.   Gp            : ARRAY[0..255] OF CHAR;
  33.  
  34. (* ================================*)
  35.  
  36. PROCEDURE CheckMessages():BOOLEAN;
  37. (*
  38.   Check for messages returns null or message and sets
  39.    all the pertainent stuff above
  40. *)
  41.  
  42. PROCEDURE DoFileLook():BOOLEAN;
  43. (*
  44.   Goes through the selected files and displays them based on the
  45.   gadget indicated in GadGot - any mouse message aborts
  46. *)
  47.  
  48. PROCEDURE DuMoveFile(VAR name,name2:ARRAY OF CHAR):LONGINT;
  49. (* renames name to name2 and marks as deleted if ok *)
  50.  
  51. PROCEDURE DuFileTwiddle(WithCopy,WithDelete:BOOLEAN):LONGINT;
  52. (* Returns IoErr
  53.    goes through list for COPY COPYDEL ZAPFILE and MOVE
  54.    COPYDEL -  BOTH true   (copy then delete source)
  55.    COPY    -  Only WithCopy true
  56.    ZAPFILE -  Only WithDelete true
  57.    MOVE    -  BOTH false
  58.               (rename FileName to Dest path+FileName - not across devices)
  59. *)
  60.  
  61. PROCEDURE DuExec():LONGINT;
  62. (* Returns IoErr
  63.   either RUN >NIL: or just executes various programs
  64. *)
  65.  
  66. PROCEDURE ReplaceRSDM(g:GadgetNames;VAR a:ARRAY OF CHAR);
  67. (*
  68.    Replaces the affected gadget 'g' IOString with 'a' text
  69.    and refreshes the gadgets to make sure it shows.
  70.    This one removes - fixes - replaces - refreshes
  71. *)
  72.  
  73. PROCEDURE StringIt(n:LONGCARD;VAR s:ARRAY OF CHAR):BOOLEAN;
  74. (*
  75.   Just a quick boolean to convert 'n' to a string
  76. *)
  77.  
  78. PROCEDURE AskForConfirm;
  79. (*
  80.    Displays confirm message
  81. *)
  82.  
  83. (********)
  84. (* MAIN *)
  85. (********)
  86.  
  87. END DuMisc.
  88.